package golanghelper

func SafeRun(fc func()) (err error) {
	defer func() {
		var ok bool
		if err, ok = recover().(error); ok && err != nil {
			return
		}
	}()

	fc()
	return
}
